package com.changgou.goods.controller;
import com.changgou.entity.PageResult;
import com.changgou.entity.Result;
import com.changgou.entity.StatusCode;
import com.changgou.goods.service.TemplateService;
import com.changgou.goods.pojo.Template;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@RestController
@CrossOrigin
@RequestMapping("/template")
public class TemplateController {


    @Autowired
    private TemplateService templateService;


    /**
     * 添加分类选择模板下拉选
     * @return
     */
    @GetMapping("/findAllTemplate")
    public Result findAllTemplate(){
        List<Template> allTemplate = templateService.findAllTemplate();
        return new Result(true,StatusCode.OK,"查询成功",allTemplate);

    }
}
